package cn.south.campus.admin.sys.model.req;

import cn.south.campus.admin.sys.model.entity.SysMenu;
import cn.south.campus.common.model.qo.BaseQO;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotNull;

/**
 * @author chow
 * @version 1.0
 * @since 2024-11-01
 */
@EqualsAndHashCode(callSuper = true)
@Data
public class SysMenuReq extends BaseQO<SysMenu> {

    /**
     * 名称
     */
    @NotNull(message = "名称不能为空")
    @Length(min = 2, max = 20, message = "名称 2~20个字符")
    private String menuName;
    /**
     * 路由
     */
    @NotNull(message = "路由不能为空")
    @Length(min = 2, max = 50, message = "路由 50个字符")
    private String path;
    /**
     * 权限code
     */
    private String permissionCode;
    /**
     * 图标
     */
    private String icon;
    /**
     * 父级ID
     */
    private Long parentId;

    /**
     * 排序
     */
    private Integer sort;
}
